package Stringbuid;

public class IndexOfDemo {
    public static void main(String[] args) {
        String str="qweasdzqwexc";
        int index=str.indexOf("z");
        System.out.println(index);
        index=str.indexOf("qwe",2);
        System.out.println(index);
        index=str.indexOf("jhghj");
        System.out.println(index);
        index=str.lastIndexOf("qwe");
        System.out.println(index);
    }
}
